home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 40
/
Aminet 40 (2000)(Schatztruhe)[!][Dec 2000].iso
/
Aminet
/
comm
/
tcp
/
rxsocket.lha
/
rxsocket
/
Examples
/
suitable.rexx
< prev
next >
Wrap
OS/2 REXX Batch file
|
1999-05-29
|
750b
|
35 lines
/*
SEARCH FOR A "SUITABLE INTERFACE" = "UP AND NOT LOOPBACK"
*/
l="rexxsupport.library";if ~show("L",l) then;if ~addlib(l,0,-30) then do;say "can't find" l;exit;end
l="rmh.library";if ~show("L",l) then;if ~addlib(l,0,-30) then do;say "can't find" l;exit;end
l="rxsocket.library";if ~show("L",l) then;if ~addlib(l,0,-30) then do;say "can't find" l;exit;end
prg=ProgramName("NOEXT")
if arg()~=0 then do
call PrintFault(118,prg)
exit
end
res=QueryInterfaces("IN")
if res<0 then do
say prg": cannot query ("errno()")"
exit
end
if res==0 then do
say prg": no suitable device found"
exit
end
do i=0 to res-1
if in.i.family==2 & in.i.UP==1 & in.i.LOOPBACK==0 then do
say prg":" in.i.NAME
exit
end
end
say prg": no suitable device found"